feat(board): port board (dashboard) commands from Go CLI#13
Draft
beengud wants to merge 1 commit into
Draft
Conversation
Add `observe board` with create/update (DashboardInput JSON), scaffold, set-default/clear-default, and explicit list/get/delete (the new CLI has no generic object layer). Reproduces PR #9 behavior: visibility/folderId fields and a printed board VIEW URL after create/update. Normalizes board JSON for saveDashboard: renames deprecated stage `stageID` to StageQueryInput `id`, defaults each stage `input` to [], and defaults InputDefinitionInput `stageId`/`inputRole` so read-back queries don't hit null non-null fields. Closes #2 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2
Ports the
board(dashboard) commands from the deprecated Go Observe CLI to the TypeScript CLI.Ported surface —
observe boardcreate <file.json>—saveDashboardfrom a DashboardInput JSON (name, workspaceId, layout required; stages optional).update <id> <file.json>— same mutation withidinjected.scaffold [--name NAME]— prints a starting board JSON template.set-default <dataset-id> <board-id>—setDefaultDashboard.clear-default <dataset-id>—clearDefaultDashboard.list [--name --folder --workspace]—dashboardSearch.get <id>—dashboard(id).delete <id>—deleteDashboard.The new CLI has no generic object layer, so list/get/delete are added explicitly.
PR #9 parity
visibilityandfolderId.create/updateprintCreated/Updated: <name> (id: <id>),Visibility: <v>, and the board VIEW URL (https://{customerId}.{domain}/workspace/{ws}/dashboard/{id}).Board JSON normalization (for saveDashboard)
stageID→ StageQueryInputid(without it, the API ignores the label and layoutcard.stageIdreferences break).inputto[]when missing.stageId: ""andinputRole: "Data"so read-back queries don't hit null on non-null fields.updatedDate.Field-name corrections vs the Go fork
dashboardSearchreturnsDashboardSearchResultWrapper { dashboards: [...] }in the published SDL — notresultsas the GogqlSearchBoardused. Codegen rejectedresults; the operation usesdashboards.DWSearchInputfields are lists (name: [String!],workspaceId: [ObjectId!],folderId: [ObjectId!]), so the list command wraps each filter value in an array.id(notstageID/stageId), matching the normalization above.Verification
✔ Generate(all 6 board operations validated).tsc --noEmit: no errors in any non-testsrc/commands/boardorsrc/gql/boardsource (only the expectedbun:test/import.meta.dirnoise in test files, plus pre-existing unrelated errors elsewhere that depend on the not-generatedsrc/rest/generated).bun test src/commands/board/: 14 pass / 0 fail across 4 files.🤖 Generated with Claude Code